package com.itcast.mallweb.mapper;

import com.itcast.admin.dto.OrderDTO;
import com.itcast.admin.vo.OrderAllVO;
import com.itcast.applet.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface OrderMapper {
    //查询全部订单封装成集合
    @Select("select id, user_id, address_id, order_id, number, price, create_time, update_time, status from `order`")
    List<Order> orderQueryAll();

    //查询全部订单
    List<OrderAllVO> orderAllQuery(List<Long> ListId);

    //修改订单状态
    void orderAmend(Order order);

    //根据id查询订单表
    @Select("select id, user_id, address_id, order_id, number, price, create_time, update_time, status from `order` where id = #{id}")
    Order orderGetById(Long id);


    //修改订单状态
    void orderAmendStatus(OrderDTO orderDTO);
}
